home *** CD-ROM | disk | FTP | other *** search
/ Internet Tools (InfoMagic) / Internet Tools.iso / samba / SMBGuide.txt < prev    next >
Text File  |  1995-04-24  |  30KB  |  788 lines

  1. =================================================================
  2. NOTE! The following document is now VERY out of date. Anyone feel
  3. like doing an updated version?
  4.  
  5. If you read this info in it's cuirrent form then I strongly suggest
  6. you also read the manual pages, README and the *.txt files that come
  7. with Samba. They are much more uptodate. If your find they disagree
  8. with this document then this document is almost certainly in the
  9. wrong!
  10.  
  11. Refer to the man pages for more up to date info.
  12. =================================================================
  13.  
  14.  
  15.  
  16. Samba Suite. Document version 1.7.00. Copyright Karl Auer 1994
  17.  
  18.  
  19.  
  20.  
  21. Samba
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. A LanManager(R)-compatible server suite for Unix
  29.  
  30.  
  31. created by
  32. Andrew Tridgell
  33. (Andrew.Tridgell@anu.edu.au)
  34.  
  35. with help from the 'Net!
  36.  
  37.  
  38. General Notes and Installation Guidelines
  39. by Karl Auer
  40. (Karl.Auer@anu.edu.au)
  41.  
  42. Contents
  43.  
  44. Introduction                        3
  45.     Credits    
  46.     Legal stuff
  47. Contributors                        4
  48. Some terminology                    5
  49. How it all works                    6
  50. The programs                        7
  51.     smbd
  52.     nmbd
  53.     smbclient
  54.     testprns
  55.     testparm
  56.     smbprint
  57. The manual pages                    8
  58.     smb.conf(5)
  59.     smbd(8)
  60.     nmbd(8)
  61.     smbclient(1)
  62.     testprns(1)
  63.     testparm(1)
  64. Building the suite                    9
  65.     First, obtain the source code...
  66.     ...unpack the source code...
  67.     ...modify the configuration details...        10
  68.     ...compile the sources...            11
  69.     ...and install the suite.
  70. Installation                        12
  71.     What needs to be installed
  72.     Setting up the configuration file, smb.conf
  73.     To name serve or not to name serve?        13
  74.     The options for running the servers
  75.     Decisions!                    14
  76.     Installing as a daemon                15
  77.     Installing for use with inetd            16
  78.     Testing your servers                17
  79. Running Samba as non-superuser              18
  80. Installing and using DOS/Windows clients        19
  81.     Remember - TCP/IP!
  82.     A host by any other name...
  83.  
  84. Introduction
  85.  
  86. The Samba suite is a set of programs which run under the Unix
  87. operating system. These programs deliver most of the important
  88. functionality of a Microsoft Lan Manager server. That is, they support
  89. remote access to Unix filespace and Unix printers from Lan Manager
  90. compatible clients. In practical terms, this means that such clients
  91. can connect to and use Unix filespace as if it was a local disk drive,
  92. or Unix printers as if they were local printers.
  93.  
  94. Some of the most popular Lan Manager compatible clients include Lan
  95. Manager itself, Windows for Workgroups, OS/2 and Windows NT.
  96.  
  97. Using the smbclient program (part of the suite) under Unix, it is also
  98. possible to mount the filespace and printer services available on
  99. other Lan Manager compatible servers and access them from Unix.
  100.  
  101. This document is mainly aimed at helping you understand and install
  102. the Samba suite under Unix, but there is a section at the end on
  103. installing clients.
  104.  
  105. Credits
  106.  
  107. The creator of the Samba suite is Andrew Tridgell
  108. (Andrew.Tridgell@anu.edu.au) who wrote the server suite in the first
  109. place and who has continued to provide most of the ideas, most of the
  110. code and most of the effort. For a run down on how it all began, check
  111. out the file "history" in the sources distribution.
  112.  
  113. Andrew gets double credit, for after writing this great piece of
  114. software he then GPL'ed it, making it available to anyone who wants it
  115. at no cost.
  116.  
  117. Many thanks also to the many people who contributed code for different
  118. platforms, bug reports, bug fixes and great ideas.
  119.  
  120. Errors
  121.  
  122. If you discover problems with this document or would like to suggest
  123. useful additions, please email Karl.Auer@anu.edu.au (actual text for
  124. inclusion particularly welcomed!).
  125.  
  126. Legal stuff
  127.  
  128. All companies and products mentioned in this document are trademarks
  129. or registered trademarks of their respective owners.  This document is
  130. Copyright Karl Auer 1994. It may be reproduced freely provided that
  131. modifications are identified as such and are not attributed to Karl
  132. Auer.
  133.  
  134. Contributors
  135.  
  136. In alphabetical order by surname:
  137.  
  138. Adams, Graham        (gadams@ddrive.demon.co.uk)
  139. Allison, Jeremy        (jeremy@netcom.com)
  140. Auer, Karl        (Karl.Auer@anu.edu.au)
  141. Bogstad, Bill        (bogstad@cs.jhu.edu)
  142. Boreham, Bryan        (bryan@alex.com)
  143. Butler, Michael        (imb@asstdc.scgt.oz.au)
  144. Fisher, Lee        (leefi@microsoft.com)
  145. Hudson, Tim        (gslmail.mincom.oz.au)
  146. Hulthen, Erik Magnus    (magnus@axiom.se)
  147. Iversen, Per Steinar    (iversen@dsfys1.fi.uib.no)
  148. Kaara, Pasi        (ppk@atk.tpo.fi)
  149. Karman, Merik        (merik@blackadder.dsh.oz.au)
  150. Kiff, Martin        (mgk@newton.npl.co.uk)
  151. Kukulies, Christoph    (kuku@acds.physik.rwth-aachen.de)
  152. Lendecke, Volker    (lendecke@namu01.gwdg.de)
  153. Pierson, Jacques    (pierson@ketje.enet.dec.com)
  154. Powell, Mark        (mark@scot1.ucsalf.ac.uk)
  155. Reiz, Steven        (sreiz@aie.nl)
  156. Schlaeger, Joerg    (joergs@toppoint.de)
  157. Tridgell, Andrew    (Andrew.Tridgell@anu.edu.au)
  158. Troyer, Dean        (troyer@saifr00.ateng.az.honeywell.com)
  159. Wakelin, Ross        (rossw@march.co.uk)
  160.  
  161. Some terminology
  162.  
  163. Here are some of the terms we will use through this discussion.
  164.  
  165. host        A computer (usually Unix)
  166. server         Software that provides access to resources for client hosts
  167. server host    A computer on which server software is running
  168. client        A computer that accesses resources provided by another computer
  169. client user    The (human) user of a client
  170. username    A login identity on a Unix host
  171. user        The entity associated with a username on a Unix host
  172.  
  173. For example, Fred Nurk logs in to the Unix host deepthought. He logs
  174. in using the username fred, so on deepthought he is the user
  175. fred. deepthought is running the server smbd, so deepthought is
  176. also a server host. Fred's PC is running Lan Manager, so Fred's PC is
  177. a client and Fred is a client user - at least while Fred is using
  178. resources made available by smbd.
  179.  
  180. The above terms are admittedly a little contrived, but without
  181. specific terms for all these, the situation gets very confusing!
  182.  
  183. How it all works
  184.  
  185. The whole system is built around the idea of "services" (sometimes
  186. called "shares" for reasons which will become obvious). A service is a
  187. resource made available by a server for access by clients.
  188.  
  189. All services are defined in a single control file, called
  190. smb.conf. Actually you can call it anything, but that's the
  191. conventional name. The server can only provide access to resources
  192. that the server host it is running on has access to.
  193.  
  194. Services are based on directories. When making filespace available,
  195. the directory is the directory (on the server host) to which clients
  196. are being given access. When making a printer available, the directory
  197. is the spool directory (on the server host) where data will be written
  198. before printing.
  199.  
  200. Each service is defined in terms of a directory, a username and sundry
  201. other parameters. The username is of particular interest, because it
  202. is this username that defines whether clients can access the resource
  203. and what privileges they have when they do. Each username is a
  204. specific Unix user name, just as might be used by a person logging in
  205. to the server host.
  206.  
  207. A client user establishes a connection to the server by specifying the
  208. desired server host and the name of the service they wish to
  209. access. For most services the client user must also specify a
  210. password. The username specified for the service in the configuration
  211. file, plus the password supplied by the client user, is then checked
  212. by the server host's usual password checking system before the client
  213. is given access to the service.
  214.  
  215. Once access has been granted to a service, all operations on that
  216. service will be done as if by the user specified for the
  217. service. Files created, for example, will be owned by that user and
  218. accesses to files and devices will be governed by the privileges of
  219. that user.
  220.  
  221. Security provided by the server and specified in the configuration
  222. file is in addition to the access rights specified by the Unix host
  223. the server is running on. The server cannot give any access to a user
  224. that the server host would not ordinarily allow that user.
  225.  
  226. There is a default username, which is used for all services where no
  227. other username is specified. Typically this user has very few
  228. privileges, and usually would not be permitted to log on to the Unix
  229. host. This default user is typically used for public services such as
  230. shared printers or read-only directories.
  231.  
  232. The programs
  233.  
  234. smbd
  235.  
  236. This program is the server itself. It services connections made by
  237. clients based on the information in the configuration file.
  238.  
  239. nmbd
  240.  
  241. This program performs netbios name serving. In almost all cases,
  242. someone installing smbd will also want to install nmbd.
  243.  
  244. When a client is seeking to connect to a host, it first broadcasts a
  245. name service request, saying, in effect, "I have this name, what is
  246. the IP address?". The nmbd responds to such requests, allowing
  247. clients to locate servers.
  248.  
  249. smbclient
  250.  
  251. This program is a Unix-based client program. It works rather like the
  252. familiar ftp program - the client user gets a prompt, and can issue
  253. commands which the client passes on to the server. The results are
  254. then displayed by the client program to the client user.
  255.  
  256. Using this client program, Unix users can access remote Lan Manager
  257. services - move files to and from Unix, print files, see directory
  258. listings and so on.
  259.  
  260. smbclient differs from PC client programs in that it does not provide
  261. redirection. That is, the resources it connects to do not appear to
  262. the client user as if they were local.
  263.  
  264. testprns
  265.  
  266. Very much a primitive test program, this is a quick-and-dirty way to
  267. see if a printer name is valid.
  268.  
  269. testparm
  270.  
  271. Also a quick-and-dirty program, testparm performs a "syntax check" on
  272. the smbd configuration file. There may still be logical errors in
  273. it, but if testparm says it's OK, then at least the problems are not
  274. in the structure of the configuration file!
  275.  
  276. smbprint
  277.  
  278. This is a script which, when specified appropriately to your host's
  279. printing subsystem, will allow printing to a remote Lan Manager
  280. printer.
  281.  
  282. The manual pages
  283.  
  284. These are Unix man pages, which are typically installed after building
  285. the Samba suite. They are kept in step with the software as much
  286. as possible - except for the source code itself, the man pages ALWAYS
  287. have the most current information about software options and usage.
  288.  
  289. smb.conf(5)
  290.  
  291. Describes the configuration file in great depth. Reading this man page
  292. in conjunction with this document will also give you quite a good feel
  293. for how the whole system operates. Required reading if you are setting
  294. up the Samba suite!
  295.  
  296. smbd(8)
  297.  
  298. Describes the command line options and operation of the server program.
  299.  
  300. nmbd(8)
  301.  
  302. Describes the command line options and operation of the netbios name
  303. server program. It also describes fairly well what the netbios name
  304. server does - again, well worth a read if you are setting up the SMB
  305. server suite.
  306.  
  307. smbclient(1)
  308.  
  309. Describes the command line options and operation of the Unix-based
  310. client program. This client program is a really good way to test a new
  311. installation, particularly since no client machine is required. This
  312. man page also explains the many commands available from within the
  313. smbclient program.
  314.  
  315. testprns(1)
  316.  
  317. Describes the testprns program. Most importantly, it discusses the
  318. limitations of the testprns program, which are many!
  319.  
  320. testparm(1)
  321.  
  322. Describes the testparm program. Like testprns, testparm has a lot of
  323. limitations, being basically a development tool.
  324.  
  325. Building the suite
  326.  
  327. To compile the Samba suite, you need access to a suitable Unix
  328. machine with an ANSI compiler. GCC is excellent.
  329.  
  330. The following steps are pretty much in the correct order, but we
  331. recommend reading this entire section before beginning.
  332.  
  333. First, obtain the source code...
  334.  
  335. The first step towards getting the Samba suite operational is to
  336. obtain the source code. At time of writing, the current version is
  337. 1.7.00.
  338.  
  339. The source code may be obtained via anonymous ftp from:
  340.  
  341.     nimbus.anu.edu.au:/pub/tridge/samba
  342.  
  343. ...unpack the source code...
  344.  
  345. Create a directory in which to work. Copy the sources file to the
  346. directory. If the source file is compressed uncompress it and extract
  347. all components. Assuming you picked it up from nimbus, the source file
  348. will be a gzipped tar archive, so:
  349.  
  350.     cd source_dir
  351.     gunzip samba-1.7.00.tar.gz
  352.     tar xfv samba-1.7.00.tar
  353.  
  354. The original tar file is no longer needed, so you can archive it or
  355. discard it.
  356.  
  357. Check out the files COPYING, README and THANKS. For a bit of
  358. interesting story- telling, you might also find the file history
  359. interesting. The file change-log makes for very interesting reading
  360. too, describing as it does all the changes and improvements that have
  361. happened along the way.
  362.  
  363. These files also show you how many people have contributed. As you
  364. proceed through installation and strike the inevitable frustrations,
  365. remember how much work this software represents.
  366.  
  367. ...modify the configuration details...
  368.  
  369. Most configuration can be done in the supplied Makefile. However, some
  370. additional configuration can be done by editing local.h. In general,
  371. there should be no need to alter local.h and we do not recommend doing
  372. so unless you know exactly what you are doing.
  373.  
  374. So - edit the Makefile.
  375.  
  376. The man page directories must exist if you intend to install the man
  377. pages using this Makefile - check MANDIR and correct it if necessary.
  378.  
  379. You will almost certainly want to alter the installation directory
  380. (INSTALLDIR). We recommend that the servers and associated programs
  381. NOT be installed in /usr/local/bin, but instead in their own directory
  382. under /usr/local. This makes it easier to install upgrades. It also
  383. allows administrative access to be given to non-root users using
  384. groups without decreasing security on other software.
  385.  
  386. The log file path and basename (DEBUGFILE), configuration file path
  387. (SERVICES) and default guest user (FLAGS4) can all be specified on the
  388. command line to the programs or overridden in the configuration file,
  389. so these can be left as they are or edited to suit your system.
  390.  
  391. The default guest user specified in FLAGS4 should be set up if no
  392. suitable one exists. We suggest setting up a user called
  393. "nobody". While not mandatory, we strongly recommend that the default
  394. user should be unable to log on as an interactive user. The default
  395. user should have no privileges - they should own no files and should
  396. belong to a group of their own (we suggest a group "nogroup" be set up
  397. as well). The only access the default user should have to the system
  398. is to files, directories and devices that are world-readable or
  399. world-writable.
  400.  
  401. Select the environment-specific stuff (FLAGSM and LIBSM) as
  402. appropriate to your system. Most of the ones in the Makefile are
  403. pretty much OK, but you should check and alter them if necessary - the
  404. comments in the Makefile should help here. The Makefile comes with
  405. SunOS as the target system - remember to comment it out if you are
  406. compiling for a different system.
  407.  
  408. Depending on how paranoid you are, you should probably at least peruse
  409. local.h to see how other things are set up.
  410.  
  411. ...compile the sources...
  412.  
  413. You can do this two ways - the cautious way and the bold way.
  414.  
  415. The cautious way is to "make all", which just builds the
  416. executables. You can then use "make installbin", "make installman" or
  417. "make install" to install everything.
  418.  
  419. The bold way is to "make install" which will build and install
  420. everything in one fell swoop. The installation puts the executables in
  421. INSTALLDIR and the man pages in directories below MANDIR, all with
  422. appropriate permissions.
  423.  
  424. We recommend the cautious approach. 
  425.  
  426. While every effort has been made to help the SMB suite compile on all
  427. those different platforms, it is likely that there will be some minor
  428. problems, unless you happen to be using SunOS or Linux, the two most
  429. thoroughly tested platforms.
  430.  
  431. Feel free to email questions to netbios@arvidsjaur.anu.edu.au. If you
  432. fix problems on a supported platform or get the suite working on a
  433. hitherto unsupported platform, PLEASE mail context diffs to
  434. Andrew.Tridgell@anu.edu.au for incorporation in the next version.
  435.  
  436. ...and install the suite.
  437.  
  438. Once all the programs have compiled to your satisfaction, you can
  439. install the software and manual pages.
  440.  
  441. You will probably need to be root to install man pages or to install
  442. anywhere other than your own home directory tree. These instructions
  443. assume that you either have root access yourself or can get someone
  444. with root access to help you. If neither of these is the case, simply
  445. leave the executables in the source directory and run them from
  446. there. The following section still has valuable information, but you
  447. might also like to read the section on "Running Samba as a
  448. non-superuser".
  449.  
  450. If you have root access, installation is pretty simple:
  451.  
  452.     check that MANDIR, INSTALLDIR and INSTALLPERMS in Makefile
  453.     ensure that the man page directories exist
  454.     ensure that the installation directory exists
  455.     type "make install".
  456.  
  457. Installation
  458.  
  459. As with the section on building the Samba suite, we strongly
  460. recommend that you read this section in its entirety before starting
  461. the process of installing the suite.
  462.  
  463. What needs to be installed
  464.  
  465. Installing the Samba suite involves four steps:
  466.  
  467.     install the binaries and man pages
  468.     edit the configuration file to correctly define the services you need
  469.     set up the netbios name server to handle connections from clients
  470.     set up the Samba to handle connections from clients
  471.  
  472. The first of these steps is done by the make file ("make
  473. install"). The others are a bit more complex and are described below.
  474.  
  475. Setting up the configuration file, smb.conf
  476.  
  477. You will need to set up a suitable configuration file to defining the
  478. services that your clients will need to access. We STRONGLY recommend
  479. that this file be called "smb.conf".
  480.  
  481. The sample configuration file supplied with the Samba suite
  482. should be enough to start with. It provides all users access to their
  483. home directories and provides access to all printers supported by the
  484. local printing subsystem.
  485.  
  486. Note that the sample is not installed by the make file - you need to
  487. copy it from the source directory to wherever you want it kept. For
  488. obvious reasons it should be writable only by root. It is not
  489. necessary that it be readable by anyone except root either, but
  490. typically it will be world-readable.
  491.  
  492. The sample file contains comments on items that may need alteration to
  493. suit your circumstances - please read these comments carefully before
  494. allowing access to the server.
  495.  
  496. Beyond the basics as supplied in the sample configuration file,
  497. requirements will vary wildly from site to site. Some example
  498. configurations are given as comments in the sample configuration
  499. file. You should also read the man page smb.conf(5).
  500.  
  501.  
  502. To name serve or not to name serve?
  503.  
  504. Without the netbios name server software, each client must maintain
  505. its own netbios name list to map IP addresses to netbios names. This
  506. is a pain to keep up to date, is typically something most client users
  507. do not want to have to know about, and is generally Not Good.
  508.  
  509. Although it is NOT strictly needed, we strongly recommend installing
  510. nmbd on one Unix machine in each subnet.
  511.  
  512. The options for running the servers
  513.  
  514. There are two ways the servers can be run - either as daemons or via inetd.
  515.  
  516. If run as daemons, the servers will be permanently resident in
  517. memory. This saves some time when a new connection from a client is
  518. needed, because the servers do not need to be loaded from disk. On the
  519. other hand, the servers will need to be manually killed in order to be
  520. updated and the memory they occupy will be occupied even when no
  521. connections are active.
  522.  
  523. The main advantage of running the servers as daemons is that this can
  524. be done without root access, allowing you to play with the servers
  525. secure in the knowledge that the only data you can obliterate will be
  526. your own.
  527.  
  528. If run via inetd, the servers are started by the inetd "meta-daemon"
  529. when a connection request is received on the appropriate port. This
  530. takes a little longer, as the program must be loaded off
  531. disk. However, when no connections are active, the server code is not
  532. occupying RAM. Also, using inetd allows you to run things like TCP
  533. wrappers for extra security.
  534.  
  535. Installing the servers to run via inetd requires root access to the
  536. host machine, but is the recommended way of running the servers if the
  537. system is to provide a real service.
  538.  
  539. The following instructions assume you have root access and are
  540. installing the servers "for real" - ie., to provide real services to
  541. real clients. There are some notes later on about how to run the
  542. server experimentally as a non-superuser.
  543.  
  544. smbd and nmbd are both installed almost the same way, so the
  545. following descriptions apply equally to both, except where specific
  546. differences are noted.
  547.  
  548. Decisions!
  549.  
  550. Apart from deciding whether to run as a daemon or via inetd, you also
  551. need to decide several things about how the servers will operate. Here
  552. are some important questions and some discussion to help you decide
  553. what is appropriate for your site:
  554.  
  555. Where will the configuration file (smb.conf) go?
  556.  
  557. Well, anywhere really. It does need to exist and to accurately
  558. describe the services smbd is to support. The main thing is that
  559. it should be writable only by root. It does not need to be
  560. world-readable, though it won't matter if it is for most
  561. installations.
  562.  
  563. Where will the log files go?
  564.  
  565. Bear in mind that under some circumstances the log files may contain
  566. plain-text password information. At very least they are a record of
  567. who connected when and from where. Therefore they should be treated as
  568. confidential, and placed somewhere where only root can read or modify
  569. them.
  570.  
  571. The last component of the path specified for logs will be used as the
  572. basename, and appropriate log file names will be built from them For
  573. example, given a basename of "log", nmbd will create
  574. "log.nmb.debug" and so on.
  575.  
  576. What port should I use?
  577.  
  578. Unless you have VERY good reason to do otherwise, leave the ports at
  579. their defaults (139 for smbd, 137 for nmbd). These ports are
  580. "well known", and most DOS/Windows clients will not be configurable in
  581. this respect.
  582.  
  583. What debugging level do I want?
  584.  
  585. For day-to-day use, level 1 is most appropriate. Level 2 and 3 provide
  586. copious and extremely copious debugging information respectively, most
  587. of which is of interest only to developers. Levels above 3 provide
  588. ludicrous amounts of log data...
  589.  
  590. Do I need to use the -S option with the netbios name server?
  591.  
  592. Almost certainly yes. This allows the name server to use the
  593. gethostbyname() call to find out IP addresses other than it's own, but
  594. without needing a special list of such hosts. It usually also allows
  595. names outside the local subnet to be located.
  596.  
  597. Installing as a daemon
  598.  
  599. Assuming you have specified appropriate log and configuration file
  600. paths in the Makefile while building the suite, the command line for
  601. both servers will be simple - basically you need only specify the -D
  602. option, which indicates that the server should run as a daemon. In the
  603. case of the netbios name server, you probably want it to locate hosts
  604. other than itself, so also specify the -S option. Thus:
  605.  
  606. /usr/local/bin/nmbd -D -S
  607. /usr/local/bin/smbd -D
  608.  
  609. Obviously you should substitute the correct paths to the programs if
  610. they are not in /usr/local/bin.
  611.  
  612. If you did not specify suitable defaults while building the programs,
  613. you will also need to specify the log file path and basename, and (in
  614. the case of smbd) the path and filename of the configuration
  615. file.
  616.  
  617. Place these two command lines in a small script and run the script
  618. when the machine starts up, or manually. Remember that these programs
  619. must be run by root to be effective.
  620.  
  621. Installing for use with inetd
  622.  
  623. First, check that the ports are specified in /etc/services. Ensure
  624. that the following lines appear somewhere in the file:
  625.  
  626. netbios-ns    137/udp
  627. netbios-ssn    139/tcp
  628.  
  629. You don't have to use these particular ports, but it is highly
  630. recommended. If you don't remember you will have to specify the
  631. appropriate port numbers to smbd, nmbd and any clients you
  632. use.
  633.  
  634. Next, add the following lines to /etc/inetd.conf:
  635.  
  636. netbios-ns dgram udp wait root nmbd nmbd -S 
  637. netbios-ssn stream tcp nowait root smbd smbd
  638.  
  639. You should prefix the first occurrence of the server name in each line
  640. with the complete path to the executable.
  641.  
  642. If you did not specify suitable defaults while building the programs,
  643. you will also need to specify the log file path and basename, and (in
  644. the case of smbd) the path and filename of the configuration
  645. file. These should be appended to the lines shown above.
  646.  
  647. The syntax for inetd.conf does vary somewhat between systems. You
  648. should use existing entries as your guide, and check your local system
  649. documentation for the correct syntax.
  650.  
  651. Finally, restart inetd. This can be done for most systems by sending
  652. it a HUP signal. For example, if the running inetd is process ID 6789,
  653. you could restart it thus:
  654.  
  655. kill -HUP 6789
  656.  
  657. Restarting inetd in this way is harmless. 
  658.  
  659. Testing your servers
  660.  
  661. The simplest way to test smbd is to use smbclient on the same
  662. host that you have just installed the servers on. This minimises the
  663. likelihood of network-related problems. We also recommend reading the
  664. man page smbclient(1) before continuing.
  665.  
  666. If running the servers as daemons, use the ps command to check that
  667. both servers are actually running.
  668.  
  669. Now, substituting the local host name for "host" and a suitable
  670. service name for "service" (your username or "homes" will do if you
  671. have defined a [homes] section in smb.conf), try this:
  672.  
  673. smbclient "\\host\service"
  674.  
  675. Obviously this assumes that smbclient is in the path - otherwise
  676. prefix the command with the directory in which it is installed.
  677.  
  678. With some shells, all those backslashes need to be escaped:
  679.  
  680. smbclient "\\\\host\\service"
  681.  
  682. If using [homes], give your usual password when prompted, otherwise
  683. give the password for the username specified in smb.conf against the
  684. service. If the service is public, just press ENTER at the password
  685. prompt.
  686.  
  687. If "host" cannot be found, it may be that the desired host is not
  688. locatable via the normal gethostbyname() call. At the moment,
  689. smbclient uses only TCP names, not netbios names. If the host you want
  690. to connect to has a netbios name that differs from its "real" name,
  691. you have a problem. Try using the -I option and the IP address of your
  692. host to overcome this.
  693.  
  694. If the connection is refused altogether, double check the permissions
  695. and paths of the executables - this is the single most common cause of
  696. failure, especially when running the servers via inetd!
  697.  
  698. Another common problem is using the wrong case for usernames,
  699. passwords and service names. When in doubt use upper case for all.
  700.  
  701. Running Samba as non-superuser
  702.  
  703. If you don't have root access to your target host but still want to
  704. experiment, you can run smbd as an ordinary user. However, the
  705. server will have a lot of limitations, as it is designed to run as
  706. root. The biggest limitation is access to security - if you are using
  707. a system that uses shadow passwords, you will only be able to use
  708. guest services, as root access is required to check shadow passwords.
  709.  
  710. Since installing the servers to run via inetd requires root access to
  711. several system files, your only option as an ordinary user is to run
  712. the server as a daemon.
  713.  
  714. You'll need to specify a path to a configuration file you can
  715. edit. This can be done in the makefile during compilation or (more
  716. sensibly) on the command line when you run smbd.
  717.  
  718. You'll also have to specify a log basename and path that you can write
  719. to - again, this can be done in the makefile during compilation or on
  720. the command line when you run either of the servers.
  721.  
  722. Most Unixes forbid non-root access to low-numbered ports, so you'll
  723. almost certainly have to specify a port number greater that 1024. This
  724. effectively precludes experimentation with most DOS/Windows clients,
  725. as they rarely have configurable port numbers. You will be able to
  726. play with the Unix-hosted smbclient, of course, because you can
  727. specify a port number to it.
  728.  
  729. Your configuration file should specify services that provide access to
  730. directories and printers that you have access to - while you may be
  731. able to mount other services, you will be unable to use them if you do
  732. not have Unix privileges to access them. Again, if shadow passwords
  733. are used on your system, you will not be able to access non-public
  734. resources.
  735.  
  736. Installing and using DOS/Windows clients
  737.  
  738. There are quite a few of these and to fully describe even a few would
  739. be a very big task. The two most obvious ones are Lan Manager client
  740. software (the commercial one and the free one) and Windows for
  741. Workgroups.
  742.  
  743. Installing these is straightforward and reasonably well documented, so
  744. that will not be covered here. However, there are some useful tips and
  745. tricks to remember.
  746.  
  747. Remember - TCP/IP!
  748.  
  749. Whatever client you use, it must support the TCP/IP protocol in order
  750. to communicate with the Unix-hosted Samba. Typically
  751. LanMan-compatible clients run NetBEUI, so your first step after
  752. installing the client software should be to install that protocol as
  753. well.
  754.  
  755. In the case of Windows for Workgroups, a TCP/IP extension is available
  756. at no cost from ftp.microsoft.com - look for WFWTCP.EXE. This is a
  757. self-extracting file which can be extracted to a clean directory on
  758. your hard disk. Use the "Network Setup" icon in Windows for
  759. Workgroups, select "Drivers" and install an "Unlisted" protocol,
  760. specifying the directory you put the extensions in when
  761. prompted. Alternatively, unpack the distribution file to a floppy and
  762. insert it when prompted. Note that TCP/IP can coexist with NetBEUI and
  763. all the other protocols Windows for Workgroups supports.
  764.  
  765. In the case of the free Lan Manager client and others, the TCP/IP
  766. extension is either an install option (run the setup again to add it)
  767. or an installable extra (contact your vendor for details).
  768.  
  769. A host by any other name...
  770.  
  771. A computer running Windows for Workgroups can be set up so that it
  772. acts as a server host as well as a client. In Windows for Workgroups
  773. jargon, this is called "sharing" and the resource being made available
  774. is a "share". Windows for Workgroups can share printers and
  775. directories.
  776.  
  777. Many Lan Manager compatible servers require user names, service names
  778. and passwords to be in upper case. When sharing resources, Windows for
  779. Workgroups is such a server.
  780.  
  781. Most DOS-based clients automatically uppercase all server host names,
  782. user names and passwords. The smbclient program (being Unix based and
  783. thus aggressively case sensitive) does not. Remember to hit CAPS LOCK
  784. when using the smbclient program to connect to DOS-hosted servers.
  785.  
  786.  
  787.  
  788.